from __future__ import unicode_literals

from django.db import models
from datetime import date

# Create your models here.


#A simple model example for showcase
class Book(models.Model):

    name = models.CharField(max_length=100)

    isin = models.CharField(max_length=30)

    author = models.CharField(max_length=50)

    pages = models.IntegerField(default=0)

    price = models.DecimalField(decimal_places=2, max_digits=10)

    publish_date = models.DateField()

    def __str__(self):
        return "book name: %s, isin: %s, publish_date: %s"(self.name, self.isin, self.publish_date)


